<template>
	<div class="theme">
		<van-nav-bar title="DApp 设置" left-arrow @click-left="onClickLeft" />
		<div class="overlay headTop">
			<div class="overlay-content scrolling">
				<van-cell-group style="margin: 20px 0px;padding: 5px 0px;">
					<van-switch-cell v-model="checked" title="DApp 隐私模式" @change="getID" />
				</van-cell-group>
				<div style="font-size: 12px;padding-left: 15px;color: #7d7e80;">
					启动隐私模式，DApp首次访问钱包地址时需要获得你的授权。
				</div>
				<div style="background-color: white;">
					<div style="padding: 15px;margin-top: 20px;color: #FF0000;" @click="cleanDApp">
						清空 DApp 授权
					</div>
				</div>
				<div style="font-size: 12px;padding-left: 15px;margin-top: 20px;color: #7d7e80;">
					清除授权记录后，已授权的 DApp 访问钱包地址时，将需要重新获得你的授权。
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	let _this;
	export default {
		name: 'DAppSetting',
		components: {},
		props: {},
		data() {
			return {
				checked: false
			};
		},
		beforeCreate() {
			_this = this;
		},
		watch: {},
		computed: {},
		methods: {
			onClickLeft() {
				this.$router.push({
					path: '/Setting'
				});
			},
			getID() {
				console.log(this.checked);
			},
			cleanDApp() {
				this.$toast("清除 DApp 授权成功");
			}
		},
		created() {},
		mounted() {},
		destroyed() {

		},
		filters: {}
	};
</script>

<style lang="less" scoped>
	.overlay {
		background: rgb(245, 245, 245);
	}
</style>